import { SPoint } from "../../../../../Message/Public/SPoint";
import { ItemData } from "../../../resource/info/ItemData";
import { ECategory } from "../../../../../Message/Public/ECategory";
import { EProp } from "../../../../../Message/Public/EProp";
import { EItemUseType } from "../../../../../Message/Public/EItemUseType";
import { SkillConfig } from "../../../resource/SkillConfig";
import { EDrug } from "../../../../../Message/Public/EDrug";
import { EColor } from "../../../../../Message/Public/EColor";
import { TItem } from "../../../../../Message/Db/Tables/TItem";
import { HTMLUtil } from "../../../../../com/gengine/utils/HTMLUtil";
import { ColorConfig } from "../../../resource/ColorConfig";
import { EEquip } from "../../../../../Message/Public/EEquip";
import { ShopItemInfo } from "../../../resource/info/ShopItemInfo";
import { ELottertType } from "../../../../../Message/Public/ELottertType";
import { TItemWeapon } from "../../../../../Message/Db/Tables/TItemWeapon";
import { Cache } from "../../../cache/Cache";
import { EPlayerItemPosType } from "../../../../../Message/Public/EPlayerItemPosType";
import { ELimitType } from "../../../../../Message/Public/ELimitType";
import { SpecialRewardItemConfig } from "../../../resource/SpecialRewardItemConfig";
import { ClockManager } from "../../../manager/ClockManager";
import { ERuneType } from "../../../../../Message/Public/ERuneType";
import { DrugBagRecoveryConfig } from "../../../resource/DrugBagRecoveryConfig";
import { EPetLifeStyle } from "../../../../../Message/Public/EPetLifeStyle";
import { PetUtil } from "../../pet/info/PetUtil";
import { GiftBagConfig } from "../../../resource/GiftBagConfig";
import { RandomGiftBagConfig } from "../../../resource/RandomGiftBagConfig";
import { EReward } from "../../../../../Message/Public/EReward";
import { GameDefConfig } from "../../../resource/GameDefConfig";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { SPlayerItem } from "../../../../../Message/Public/SPlayerItem";
import { MountUtil } from "../../../scene/mount/MountUtil";
import { MagicWeaponUtil } from "../../magicWeapon/MagicWeaponUtil";
import { EquipmentItemDataUtil } from "../../common/EquipmentItemDataUtil";
import { EquipmentUtil } from "../../common/util/EquipmentUtil";
type int = number;
//class ItemsUtil
    
    export  class ItemsUtil
    {
        constructor()
        {
            
            this.itemPoint = new SPoint();
            return;
        }

        public static isFlyWingProp(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFlyExp;
        }

        public static isFlyGrowProp(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFlyGrow;
        }

        public static isRedPack(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRedEnvelope;
        }

        
        {
            ItemsUtil.CoinIcoUrl = "CoinIco1.jpg";
            ItemsUtil.MagicWeaponScoreTimes = [1.00001, 1.00001, 1.00001, 1.00001, 1.50001, 2.30001, 3.50001];
        }

        public static isTaskLoopBook(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropTaskLoopBook;
        }

        public static isTaskItem(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryTask;
        }

        public static isCanDestroy(arg1: ItemData): Boolean
        {
            return !ItemsUtil.isTaskItem(arg1);
        }

        public static isCanBulkUse(arg1: ItemData): Boolean
        {
            return arg1.itemAmount > 1 && (arg1.itemInfo.item.useType & EItemUseType._EItemUseTypeCanBatchUse || ItemsUtil.isInvitation(arg1));
        }

        public static isPackage(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPackage;
        }

        public static isSkillBook(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropSkillBook;
        }

        public static isPetSkillBook(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropSkillPetBook;
        }

        public static isCommomPetSkillBook(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropSkillPetBook && !SkillConfig.instance.isSpecialSkill(arg1.effect);
        }

        public static isSpecialPetSkillBook(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropSkillPetBook && SkillConfig.instance.isSpecialBookSkill(arg1.effect);
        }

        public static isPetSkillForget(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetSkillForget;
        }

        public static isPetModelChange(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetModelChange;
        }

        public static isPetSkillDig(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetSkillDig;
        }

        public static isHuntMap(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropHuntMap;
        }

        public static isHuntShovel(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropHuntShovel;
        }

        public static isPetDrug(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && (arg1.type == EDrug._EDrugBuff && arg1.effect == 2 || arg1.type == EDrug._EDrugPetEnergy || arg1.type == EDrug._EDrugPetLifeSpan || arg1.type == EDrug._EDrugPetExp || arg1.type == EDrug._EDrugPetMoreExp || arg1.type == EDrug._EDrugPetLife || arg1.type == EDrug._EDrugLifePetBag);
        }

        public static isPetLife(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugPetLife;
        }

        public static isPetEnergy(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugPetEnergy;
        }

        public static isPetLifeSpan(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugPetLifeSpan;
        }

        public static isPetUse(arg1: ItemData): Boolean
        {
            return Boolean(arg1.itemInfo.item.useType & EItemUseType._EItemUseTypePet);
        }

        public static isNotCanUse(arg1: ItemData): Boolean
        {
            return Boolean(arg1.itemInfo.item.useType == EItemUseType._EItemUseTypeCanNotUse);
        }

        public static isCanUseInBag(arg1: ItemData): Boolean
        {
            return Boolean(arg1.itemInfo.item.useType & EItemUseType._EItemUseTypeUseInBag);
        }

        public static isOpenFunc(arg1: ItemData): Boolean
        {
            return arg1.itemInfo.item.useType == EItemUseType._EItemUseTypeOpenFunc;
        }

        public static isPetEnerg(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && (arg1.type == EDrug._EDrugPetEnergy || arg1.type == EDrug._EDrugPetLifeSpan);
        }

        public static isBind(arg1: ItemData): Boolean
        {
            if (arg1.category == ECategory._ECategoryEquip || arg1.category == ECategory._ECategoryAmulet || arg1.category == ECategory._ECategoryRune || arg1.category == ECategory._ECategoryMount || arg1.category == ECategory._ECategoryPetEquip || arg1.category == ECategory._ECategorySpiritEquip || arg1.category == ECategory._ECategoryMountEquip) 
            {
                if (arg1.itemExInfo) 
                {
                    return arg1.itemExInfo.bind == 1;
                }
                return arg1.itemInfo.item.bind == 1;
            }
            return arg1.itemInfo.item.bind == 1;
        }

        public static isTrumpet(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropTrumpet;
        }

        public static isEquipStrengthenMaterial(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && (arg1.type == EProp._EPropEquipStrengthenMaterial || arg1.type == EProp._EPropEquipStrengthenProp);
        }

        public static isEquipStrengthenLuckRune(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropEquipStrengthenPerfectProp;
        }

        public static isPetEquipUpgradeStarProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetInnerAlchemy;
        }

        public static isPetEquipRecastProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetEquipRecast;
        }

        public static isEquipRefineMaterial(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRefresh;
        }

        public static isEquipRefineLuckRune(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropEquipRefineLuckRune;
        }

        public static isEquipAdvanceMaterial(arg1: ItemData): Boolean
        {
            if (arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLingBao) 
            {
                if (arg1.color < EColor._EColorOrange) 
                {
                    return true;
                }
            }
            if (arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLingBaoDaemon) 
            {
                return true;
            }
            return false;
        }

        public static isEquipAdvanceColorMaterial(arg1: ItemData): Boolean
        {
            if (arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLingBao) 
            {
                if (arg1.color == EColor._EColorOrange) 
                {
                    return true;
                }
            }
            return false;
        }

        public static isEquipPrefixUpgradeMaterial(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && (arg1.type == EProp._EPropUpgradePrefix || arg1.type == EProp._EPropPrefixHolySpecial);
        }

        public static isEquipRefreshLock(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRefreshLock;
        }

        public static isEquipMakeHoleRune(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropEquipMakeHoleRune;
        }

        public static isEquipEmbedRune(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropEquipEmbedRune;
        }

        public static isEquipRemoveRune(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropEquipRemoveRune;
        }

        public static isJewelComposeRune(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropJewelComposeRune;
        }

        public static isPropOfflineAddExperience(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropOfflineAddExperience;
        }

        public static isPropColorStone(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropColorStone;
        }

        public static isPropTransportFlushToken(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropTransportFlushToken;
        }

        public static isOverlay(arg1: TItem): Boolean
        {
            return arg1.overlay > 1;
        }

        public static getItemName(arg1: ItemData, arg2: string="{0}"): string
        {
            var loc1="";
            if (arg1) 
            {
                loc1 = HTMLUtil.addColor(arg2.replace("{0}", arg1.name), ColorConfig.instance.getItemColor(arg1.color).color);
            }
            return loc1;
        }

        public static getItemNameAndAmount(arg1: ItemData): string
        {
            var loc1="";
            if (arg1) 
            {
                loc1 = HTMLUtil.addColor(arg1.name + "×" + arg1.itemAmount, ColorConfig.instance.getItemColor(arg1.color).color);
            }
            return loc1;
        }

        public static isAttrDrug(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugBuff;
        }

        public static isInstantDrug(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && (arg1.type == EDrug._EDrugLife || arg1.type == EDrug._EDrugMana) && arg1.effect == 1;
        }

        public static isChangeshengdan(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugLifeBag;
        }

        public static isButianwan(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugManaBag;
        }

        public static isLiftEffectDrug(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && (arg1.type == EDrug._EDrugLife || arg1.type == EDrug._EDrugLifeBag) && !(arg1.effect == 1);
        }

        public static isManaEffectDrug(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && (arg1.type == EDrug._EDrugMana || arg1.type == EDrug._EDrugManaBag) && !(arg1.effect == 1);
        }

        public static isPetChangeshengdan(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugLifePetBag;
        }

        public static isTaskSilverNote(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropTaskSilverNote;
        }

        public static isChangeShape(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugChangeShape;
        }

        public static isVIPCard(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropVIPCard;
        }

        public static isFireWood(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFireWood;
        }

        public static isFlameWine(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugGuildFlameWine;
        }

        public static isPetSkillRand(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetSkillRand;
        }

        public static isKillEvilToken(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropKillEvilToken;
        }

        public static isLowHook(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFishhook && arg1.itemInfo.item.itemLevel == 1;
        }

        public static isHighHook(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFishhook && arg1.itemInfo.item.itemLevel == 2;
        }

        public static isBestHook(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFishhook && arg1.itemInfo.item.itemLevel == 3;
        }

        public static isHook(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFishhook;
        }

        public static isFish(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFish;
        }

        public static isCookedFish(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropCookedFish;
        }

        public static isPropAddResource(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropGuildAddResource;
        }

        public static isBrick(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFixGiftBag && arg1.effect == 14011429;
        }

        public static isFixGiftBag(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFixGiftBag;
        }

        public static isRandomGiftBag(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRandGiftBag;
        }

        public static isPetEgg(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetEgg;
        }

        public static isPetGrowUpMaterial(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetGrowUpMaterial;
        }

        public static isPetEquipUpgradeProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetEquipUpgrade;
        }

        public static isGodSoulMaterial(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropQixingShenhun;
        }

        public static isPetTalentAdvanceMaterial(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetTalentAdvanceMaterial;
        }

        public static isCopyDrawRewardItem(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropCopyBox;
        }

        public static isNoviceGrowthGift(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFixGiftBag && arg1.itemInfo.item.effectEx == 1;
        }

        public static isHappyBag(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropHappyBag;
        }

        public static isJewelAdvance(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropJewelAdvance;
        }

        public static isPetEquipPrefix(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetEquipPrefix;
        }

        public static duplicateItemData(arg1: ItemData): ItemData
        {
            var loc1=new ItemData(arg1.itemCode);
            loc1.itemExInfo = arg1.itemExInfo.duplicate();
            return loc1;
        }

        public static isAddPetBlessItem(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetBlessAdd;
        }

        public static isPetXisuiItem(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetXisui;
        }

        public static isMount(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryMount;
        }

        public static isFashionWeapon(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipFashionWeapon;
        }

        public static isEquipFashion(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipFashion;
        }

        public static isFashion(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && (arg1.type == EEquip._EEquipFashion || arg1.type == EEquip._EEquipFashionWeapon);
        }

        public static isWing(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipWing;
        }

        public static isFootPrint(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipFootPrint;
        }

        public static isBubble(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipBubble;
        }

        public static isSurround(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipSurround;
        }

        public static isWaistBelt(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipWaistBelt;
        }

        public static isElf(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipElf;
        }

        public static isCoin(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPriceUnitCard;
        }

        public static isVIPItem(arg1: ShopItemInfo): Boolean
        {
            return arg1.tshopSell.shopCode == 1712;
        }

        public static isLotteryKey(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLotteryKey && arg1.effect == ELottertType._ELotterySeabed;
        }

        public static isLotteryHeavenKey(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLotteryKey && arg1.effect == ELottertType._ELotteryHeaven;
        }

        public static isLotteryKunlunKey(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLotteryKey && arg1.effect == ELottertType._ELotteryKunlun;
        }

        public static isFirecracker(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLotteryKey && arg1.effect == ELottertType._ELotterySpringFestival;
        }

        public static isRootProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRootProp;
        }

        public static isRootProtect(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRootProtect;
        }

        public static isPlayerRenameProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && (arg1.type == EProp._EPropPlayerRename || arg1.type == EProp._EPropPlayerRenameShopSell);
        }

        public static isGuildRenameProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropGuildRename;
        }

        public static isGuildCallTogetherProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropGuildCallTogether;
        }

        public static isluckAwardsDrawPlateProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropDrawPlate;
        }

        public static isEquip(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip;
        }

        public static isIllustrate(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryIllustrate;
        }

        public static isSuitEquip(arg1: ItemData): Boolean
        {
            var loc1=null;
            if (arg1 && ItemsUtil.isEquip(arg1)) 
            {
                loc1 = arg1.itemInfo.extend as TItemWeapon;
                if (loc1 && loc1.suit > 0) 
                {
                    return true;
                }
            }
            return false;
        }

        public static isCanGuideUseInBag(arg1: ItemData): Boolean
        {
            return ItemsUtil.isCanUseInBag(arg1) || ItemsUtil.isEquip(arg1);
        }

        public static isChristmasCard(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropChristmasCard;
        }

        public static getEquipStrengthen(arg1: ItemData): int
        {
            var loc2=null;
            var loc1=0;
            if (arg1.category == ECategory._ECategoryEquip || ECategory._ECategoryPetEquip) 
            {
                loc2 = arg1.itemExInfo;
                if (loc2 && !(loc2.strengthen == undefined)) 
                {
                    loc1 = loc2.strengthen;
                }
            }
            return loc1;
        }

        public static isSnowball(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLotteryKey && arg1.effect == ELottertType._ELotteryChristmas;
        }

        public static isMakeFunProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugMakeFunProp;
        }

        public static isSameItemData(arg1: ItemData, arg2: ItemData): Boolean
        {
            if (arg1 && arg2 && arg1.itemCode == arg2.itemCode) 
            {
                return true;
            }
            return false;
        }

        public static isBindSameItemData(arg1: ItemData, arg2: ItemData): Boolean
        {
            if (arg1 && arg2 && (arg1.itemInfo.item.codeUnbind == arg2.itemCode || arg1.itemCode == arg2.itemInfo.item.codeUnbind)) 
            {
                return true;
            }
            return false;
        }

        public static isMaxOverlay(arg1: ItemData): Boolean
        {
            if (arg1 && arg1.itemAmount == arg1.itemInfo.item.overlay) 
            {
                return true;
            }
            return false;
        }

        public static isArenaGiftBag(arg1: ItemData): Boolean
        {
            if (arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropArenaGiftBag || arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropNewArenaGiftBag) 
            {
                return true;
            }
            return false;
        }

        public static isSundries(arg1: ItemData): Boolean
        {
            if (arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropSundries) 
            {
                return true;
            }
            return false;
        }

        public static isJewelChip(arg1: ItemData): Boolean
        {
            if (arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropJewelChip) 
            {
                return true;
            }
            return false;
        }

        public static isJewelPureChip(arg1: ItemData): Boolean
        {
            var loc1=[14140000, 14140001, 14177000, 14177001];
            return !(loc1.indexOf(arg1.itemCode) == -1);
        }

        public static isSmeltMaterial(arg1: ItemData): Boolean
        {
            if (ItemsUtil.isSundries(arg1) || ItemsUtil.isJewelChip(arg1)) 
            {
                return true;
            }
            return false;
        }

        public static isFireworkProp(arg1: ItemData): Boolean
        {
            if (arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFirework) 
            {
                return true;
            }
            return false;
        }

        public static isGuildCreat(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropGuildCreat;
        }

        public static isTitleProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropTitle;
        }

        public static isInvitation(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropInvitation;
        }

        public static isMoveGoodEquip(arg1: ItemData): Boolean
        {
            var loc1=null;
            if (arg1.itemInfo.item.level <= Cache.instance.role.entityInfo.level && (arg1.itemInfo.item.career & Cache.instance.role.entityInfo.career || arg1.itemInfo.item.career == 0)) 
            {
                loc1 = Cache.instance.pack.rolePackCache.getHeightLevelSortEquip(arg1.category, arg1.type);
                if (loc1) 
                {
                    if (arg1.color > loc1.color) 
                    {
                        return true;
                    }
                    if (arg1.color == loc1.color) 
                    {
                        if (arg1.itemInfo.item.level > loc1.itemInfo.item.level) 
                        {
                            return true;
                        }
                    }
                }
                else 
                {
                    return true;
                }
            }
            return false;
        }

        public static isWeddingFirework(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropWeddingFireWork;
        }

        public static isWeddingBubble(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropWeddingBubble;
        }

        public static isFlower(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFlower && arg1.itemInfo.item.level == 1;
        }

        public static isBlueFlower(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFlower && arg1.itemInfo.item.level == 2;
        }

        public static isBlackFlower(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFlower && arg1.itemInfo.item.level == 3;
        }

        public static isNewFlower(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFlower && arg1.itemInfo.item.level == 4;
        }

        public static isWeddingPayBackCard(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropWeddingPayBackCard;
        }

        public static isFragment(arg1: ItemData): Boolean
        {
            return arg1.itemCode == 14030003 || arg1.itemCode == 14031003;
        }

        public static isDressInPet(arg1: ItemData): Boolean
        {
            return arg1.posType >= EPlayerItemPosType._EPlayerItemPosTypePetEquipBase;
        }

        public static isLearnedSkillBook(arg1: ItemData): Boolean
        {
            var loc1=arg1.effect;
            return Cache.instance.skill.isLearnedSkill(loc1);
        }

        public static isQuickComTaskItem(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropQuickCompleteTask;
        }

        public static getNationalTreaItemNum(): int
        {
            return Cache.instance.pack.backPackCache.getTaskItemCountByCategoryAndType(ECategory._ECategoryTask, EProp._EPropTreasureOre) + Cache.instance.pack.backPackCache.getTaskItemCountByCategoryAndType(ECategory._ECategoryTask, EProp._EPropTreasureCrystal);
        }

        public static isNationalTreaItemCapable(): Boolean
        {
            return ItemsUtil.getNationalTreaItemNum() < 5;
        }

        public static isGuildImpeachLeader(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropGuildLeaderImpeach;
        }

        public static isGuildPartyHot(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropGuildPartyHot;
        }

        public static hasItemByPosAndCarrer(arg1: int, arg2: int): Boolean
        {
            var loc1=Cache.instance.pack.rolePackCache.getEnabledCareerItemDataByIndex(arg1);
            if (loc1) 
            {
                return !((loc1.itemInfo.item.career & arg2) == 0);
            }
            return false;
        }

        public static hasItemByPos(arg1: int): Boolean
        {
            var loc1=Cache.instance.pack.rolePackCache.getEnabledCareerItemDataByIndex(arg1);
            if (loc1) 
            {
                return true;
            }
            return false;
        }

        public static isGuildAnimalFood(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropGuildBeastFood;
        }

        public static isWuXingSpiritUpgrade(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropWuXingSpiritUpgrade;
        }

        public static isWuXingAttributeRefresh(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropWuXingAttributeRefresh;
        }

        public static isWuXingUpSpirit(arg1: ItemData): Boolean
        {
            var loc1=[14167400, 14167401];
            return !(loc1.indexOf(arg1.itemCode) == -1);
        }

        public static isMountAdvance(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropMountAdvance;
        }

        public static isMountAdvancePerfect(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropMountAdvancePerfect;
        }

        public static isMountStarsCulture(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropMountStarsCulture;
        }

        public static isMountRefreshGrow(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropMountRefreshGrow;
        }

        public static isGuildSkillLearn(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropGuildSkillLearn;
        }

        public static isRune(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryRune;
        }

        public static isRuneGrowth(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRuneGrowth;
        }

        public static isCoinBindSundry(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropCoinBindSundry;
        }

        public static isMountExpDrug(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugMountExpDrug;
        }

        public static isRoleExpDrug(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugMoreExp;
        }

        public static isCanForge(arg1: ItemData, arg2: ELimitType): Boolean
        {
            var loc1=null;
            if (ItemsUtil.isEquip(arg1) || ItemsUtil.isMount(arg1)) 
            {
                loc1 = SpecialRewardItemConfig.instance.getInfoByCode(arg1.itemCode);
                if (loc1) 
                {
                    return !loc1.isNotCanForge(arg2);
                }
                return true;
            }
            return false;
        }

        public static isOverdueItem(arg1: ItemData): Boolean
        {
            var loc1=false;
            arg1 = arg1;
            var loc2=arg1.itemExInfo;
            var loc3=-1;
            var loc4=ClockManager.instance.nowDate;
            if (loc2 && loc2.fashEffDay) 
            {
                loc3 = int(loc2.fashEffDay);
                if (loc4.time / (1000 * 60 * 60 * 24) > loc3) 
                {
                    loc1 = true;
                }
            }
            return loc1;
        }

        public static isHeartLock(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipHeartLock;
        }

        public static isChangeHeadIcon(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropChangeAvatar;
        }

        public static isMedal(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropMedal;
        }

        public static isRootBreakThrough(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRootBreakThrough;
        }

        public static isHolyRune(arg1: ItemData): Boolean
        {
            if (arg1.category != ECategory._ECategoryRune) 
            {
                return false;
            }
            if (arg1.type == ERuneType._ERuneTypeNormalHoly || arg1.type == ERuneType._ERuneTypeSkillHoly) 
            {
                return true;
            }
            return false;
        }

        public static isMagicWeapon(arg1: ItemData): Boolean
        {
            if (arg1.category != ECategory._ECategoryAmulet) 
            {
                return false;
            }
            return true;
        }

        public static getDrugEffectValue(arg1: int): int
        {
            var loc1=arg1 != EDrug._EDrugLifeBag ? Cache.instance.role.entityInfo.maxMana : Cache.instance.role.entityInfo.maxLife;
            var loc2=arg1 != EDrug._EDrugLifeBag ? 1 : 0;
            var loc3=DrugBagRecoveryConfig.instance.getConfigByLevel(arg1, Cache.instance.role.entityInfo.level);
            var loc4;
            return loc4 = (loc4 = int(loc3 / 1000) + int(loc3 % 1000 / 100 * loc1)) + Cache.instance.rune.getRuneEffectSelfDrugEffectValue(loc1, loc2);
        }

        public static isPetEquip(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryPetEquip;
        }

        public static isPetLifeStyle(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryPetLifeStyle;
        }

        public static isRedPetLifeStyle(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryPetLifeStyle && arg1.type == EPetLifeStyle._EPetLifeStyleRed;
        }

        public static isPetMingJuProp(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLifeStyleHunt;
        }

        public static is5FBChip(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EProp5FBChip;
        }

        public static isAvatar(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropChangeAvatar;
        }

        public static isRandItemPetSkill(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRandItemPetSkill;
        }

        public static isRefreshPetSkill(arg1: ItemData): Boolean
        {
            if (arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetSkillRand && arg1.itemExInfo) 
            {
                if (arg1.itemExInfo.rd_times > 0) 
                {
                    return true;
                }
                return false;
            }
            return false;
        }

        public static isRandItemJewel(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropRandItemJewel;
        }

        public static isFightSpirit(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropAncientLeftSpirit;
        }

        public static isPlantFlowerProp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && (arg1.type == EProp._EPropPlantFlow || arg1.type == EProp._EPropBurnLight);
        }

        public static isActivceSnowball(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropSnowball;
        }

        public static isAmuletIdentifyStone(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropAmuletIdentifyStone;
        }

        public static isAmuletValueStone(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropAmuletValueStone;
        }

        public static isAmuletActiveItem(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropAmuletActiveItem;
        }

        public static isUpgradeAmuletScoreItem(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropUpgradeAmuletScore;
        }

        public static isPetBloodVesselItem(arg1: ItemData): Boolean
        {
            var loc1=false;
            var loc2=null;
            if (arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropPetBloodUpgrade) 
            {
                loc1 = true;
            }
            else 
            {
                loc2 = PetUtil.activeItemCodes;
                if (loc2.indexOf(arg1.itemCode) > -1) 
                {
                    loc1 = true;
                }
            }
            return loc1;
        }

        public static isAmuletOpenPore(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropAmuletOpenPore;
        }

        public static isAmuletOpenPoreLevel3(arg1: ItemData): Boolean
        {
            return ItemsUtil.isAmuletOpenPore(arg1) && arg1.effect == 3;
        }

        public static isAmuletOpenPoreLevel4(arg1: ItemData): Boolean
        {
            return ItemsUtil.isAmuletOpenPore(arg1) && arg1.effect == 4;
        }

        public static isAmuletOpenPoreLevel5(arg1: ItemData): Boolean
        {
            return ItemsUtil.isAmuletOpenPore(arg1) && arg1.effect == 5;
        }

        public static isCountryStaticProp(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropCountryContrStatic;
        }

        public static isCountryTaskProp(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropCrossSpy;
        }

        public static isCountryDynamicProp(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropCountryContrDynamic;
        }

        public static isHarmMedalDeeper(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipHarmMedalDeeper;
        }

        public static isHarmMedalLower(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryEquip && arg1.type == EEquip._EEquipHarmMedalLower;
        }

        public static isTreasureBoxProp(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropTreasureBox;
        }

        public static isTreasureBoxKeyProp(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropTreasureBoxKey;
        }

        public static isHitEgg(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropHigEgg;
        }

        public static isJewel(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryJewel;
        }

        public static isNormalJewel(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryJewel && arg1.type >= 3 && arg1.type <= 7;
        }

        public static isSpecialJewel(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryJewel && arg1.type <= 20 && !ItemsUtil.isNormalJewel(arg1);
        }

        public static isSpiritEquip(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategorySpiritEquip;
        }

        public static getGiftBagDes(arg1: int, arg2: string="", arg3: string="<br/>", arg4: Boolean=false): string
        {
            var loc3=null;
            var loc4=0;
            var loc5=null;
            var loc6=null;
            var loc7=0;
            var loc1=new ItemData(arg1);
            var loc2="";
            if (!arg2) 
            {
                arg2 = loc1.itemInfo.item.descStr;
            }
            if (ItemsUtil.isFixGiftBag(loc1) || ItemsUtil.isRandomGiftBag(loc1) || ItemsUtil.isRandItemJewel(loc1) || ItemsUtil.isRandItemPetSkill(loc1)) 
            {
                if (ItemsUtil.isFixGiftBag(loc1) || ItemsUtil.isRandItemJewel(loc1) || ItemsUtil.isRandItemPetSkill(loc1)) 
                {
                    loc3 = GiftBagConfig.instance.getInfoByType(loc1.effect);
                }
                else if (ItemsUtil.isRandomGiftBag(loc1)) 
                {
                    loc3 = RandomGiftBagConfig.instance.getInfoByType(loc1.effect);
                }
                if (loc3) 
                {
                    loc4 = loc3.length;
                    loc7 = 0;
                    while (loc7 < loc4) 
                    {
                        if ((loc5 = loc3[loc7]) && loc5.type == EReward._ERewardItem) 
                        {
                            if (loc5.item.itemInfo) 
                            {
                                loc2 = loc2 + (loc5.item.itemInfo.item.name + "*" + loc5.num + arg3);
                            }
                        }
                        else if (loc5 && loc5.type > 0) 
                        {
                            loc2 = loc2 + (loc5.num + GameDefConfig.instance.getRewardDef(loc5.type).name.replace(new RegExp("\\s", "g"), "") + arg3);
                        }
                        ++loc7;
                    }
                    arg2 = arg2.replace(ItemsUtil.ITMES, loc2);
                }
            }
            if (arg4) 
            {
                return HTMLUtil.removeHtml(arg2);
            }
            return arg2;
        }

        public static getGiftBagRewards(arg1: ItemData): Array<any>
        {
            var loc2=null;
            var loc3=0;
            var loc4=null;
            var loc5=null;
            var loc6=0;
            var loc1=[];
            if (ItemsUtil.isFixGiftBag(arg1) || ItemsUtil.isRandomGiftBag(arg1) || ItemsUtil.isRandItemJewel(arg1) || ItemsUtil.isRandItemPetSkill(arg1)) 
            {
                if (ItemsUtil.isFixGiftBag(arg1) || ItemsUtil.isRandItemJewel(arg1) || ItemsUtil.isRandItemPetSkill(arg1)) 
                {
                    loc2 = GiftBagConfig.instance.getInfoByType(arg1.effect);
                }
                else if (ItemsUtil.isRandomGiftBag(arg1)) 
                {
                    loc2 = RandomGiftBagConfig.instance.getInfoByType(arg1.effect);
                }
                if (loc2) 
                {
                    loc3 = loc2.length;
                    loc6 = 0;
                    while (loc6 < loc3) 
                    {
                        if ((loc4 = loc2[loc6]) && loc4.type == EReward._ERewardItem) 
                        {
                            loc1.push(loc4.item);
                        }
                        ++loc6;
                    }
                }
            }
            return loc1;
        }

        public static getColorName(arg1: int): string
        {
            var loc1=GlobalStyle.blueName;
            var loc2=arg1;
            switch (loc2) 
            {
                case EColor._EColorWhite:
                {
                    loc1 = GlobalStyle.whiteName;
                    break;
                }
                case EColor._EColorGreen:
                {
                    loc1 = GlobalStyle.greenName;
                    break;
                }
                case EColor._EColorBlue:
                {
                    loc1 = GlobalStyle.blueName;
                    break;
                }
                case EColor._EColorPurple:
                {
                    loc1 = GlobalStyle.purpleName;
                    break;
                }
                case EColor._EColorOrange:
                {
                    loc1 = GlobalStyle.orangeName;
                    break;
                }
                case EColor._EColorRed:
                {
                    loc1 = GlobalStyle.goldName;
                    break;
                }
                case EColor._EColorRedGold:
                {
                    loc1 = GlobalStyle.goldName;
                    break;
                }
            }
            return loc1;
        }

        public static getMagicWeaponScore(arg1: ItemData): int
        {
            if (arg1 == null) 
            {
                return 0;
            }
            var loc1=0;
            if (arg1.itemExInfo) 
            {
                loc1 = arg1.itemExInfo.al_sc;
            }
            return int(loc1 * ItemsUtil.MagicWeaponScoreTimes[arg1.color] * 100 / 100);
        }

        public static isMountStartsBead(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropMountStarsBead;
        }

        public static isLuckyBag(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropLuckyBag;
        }

        public static isFightSpritBreakRune(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropFightSpiritBreakRune;
        }

        public static copyItemData(arg1: ItemData): ItemData
        {
            var loc1=null;
            var loc2=null;
            if (arg1) 
            {
                loc1 = new SPlayerItem();
                loc1.playerId = arg1.data.playerId;
                loc1.uid = arg1.data.uid;
                loc1.itemCode = arg1.data.itemCode;
                loc1.itemAmount = arg1.data.itemAmount;
                loc1.posType = arg1.data.posType;
                loc1.jsStr = arg1.data.jsStr;
                loc2 = new ItemData(loc1);
            }
            return loc2;
        }

        public static isHasExpired(arg1: ItemData): Boolean
        {
            var loc4=NaN;
            var loc5=NaN;
            var loc1=false;
            var loc2=arg1.itemExInfo;
            var loc3=0;
            if (loc2) 
            {
                if (arg1.category == ECategory._ECategoryEquip) 
                {
                    if (arg1.type != EEquip._EEquipFashion) 
                    {
                        if (arg1.type == EEquip._EEquipHarmMedalDeeper || arg1.type == EEquip._EEquipHarmMedalLower) 
                        {
                            loc3 = int(loc2.medalEffDay);
                        }
                        else if (arg1.type != EEquip._EEquipWing) 
                        {
                            if (arg1.type != EEquip._EEquipFootPrint) 
                            {
                                if (arg1.type != EEquip._EEquipBubble) 
                                {
                                    if (arg1.type != EEquip._EEquipSurround) 
                                    {
                                        if (arg1.type != EEquip._EEquipWaistBelt) 
                                        {
                                            if (arg1.type == EEquip._EEquipElf) 
                                            {
                                                loc3 = int(loc2.ELFEffDay);
                                            }
                                        }
                                        else 
                                        {
                                            loc3 = int(loc2.WBEffDay);
                                        }
                                    }
                                    else 
                                    {
                                        loc3 = int(loc2.surroundEffDay);
                                    }
                                }
                                else 
                                {
                                    loc3 = int(loc2.bubbleEffDay);
                                }
                            }
                            else 
                            {
                                loc3 = int(loc2.footprintEffDay);
                            }
                        }
                        else 
                        {
                            loc3 = int(loc2.wingEffDay);
                        }
                    }
                    else 
                    {
                        loc3 = int(loc2.fashEffDay);
                    }
                }
            }
            if (loc3 > 0) 
            {
                loc4 = (loc3 + 1) * 24 * 3600 * 1000;
                loc5 = ClockManager.instance.nowDate.time;
                if (loc4 < loc5) 
                {
                    loc1 = true;
                }
            }
            if (arg1.category == ECategory._ECategoryMount && MountUtil.instance.isOverTime(arg1)) 
            {
                loc1 = true;
            }
            if (arg1.isFaultMagicWeapon || MagicWeaponUtil.isShowMask(arg1)) 
            {
                loc1 = true;
            }
            if (loc2 && arg1.category == ECategory._ECategoryProp) 
            {
                loc4 = int(loc2.prop_exist_t) * 1000;
                loc5 = ClockManager.instance.nowDate.time;
                if (loc4 > 0 && loc4 < loc5) 
                {
                    loc1 = true;
                }
            }
            return loc1;
        }

        public static isMountEquipt(arg1: ItemData): Boolean
        {
            if (arg1 && arg1.category == ECategory._ECategoryMountEquip) 
            {
                return true;
            }
            return false;
        }

        public static isMountEquipUpgradeProp(arg1: ItemData): Boolean
        {
            if (arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropMountEquipAdvance) 
            {
                return true;
            }
            return false;
        }

        public static isMountEquipOnMan(arg1: ItemData): Boolean
        {
            return arg1.posType == EPlayerItemPosType._EPlayerItemPosTypeRole;
        }

        public static isMountLevelBack(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropMountLevelBack;
        }

        public static isDrugExpByLv(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugExpByLevel;
        }

        public static isDrugNewExp(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryDrug && arg1.type == EDrug._EDrugTimeLimitExp;
        }

        public static isGuessCouplet(arg1: ItemData): Boolean
        {
            return arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropGuessCouplet;
        }

        public static isCanSellOrDrag(arg1: ItemData): Boolean
        {
            return arg1 && (arg1.posType == EPlayerItemPosType._EPlayerItemPosTypeBag || arg1.posType == EPlayerItemPosType._EPlayerItemPosTypeStoneBag || arg1.posType == EPlayerItemPosType._EPlayerItemPosTypeAmuletBag);
        }

        public static getAttributeByItemData(arg1: ItemData): Array<any>
        {
            var loc4=null;
            var loc6=0;
            var loc1=[];
            var loc2=new EquipmentItemDataUtil(arg1);
            var loc3=loc2.getAddtionalArray();
            var loc5=new Map<any, any> /* flash.utils.Dictionary */();
            while (loc6 < loc3.length) 
            {
                loc4 = loc3[loc6];
                loc5[loc4["addition"]] = loc4["value"];
                ++loc6;
            }
            var loc7=Cache.instance.role.entityInfo.career;
            loc1 = EquipmentUtil.getSelfCareerAttribute(loc7, loc5);
            return loc1;
        }

        public static isSpiritEquipHD(arg1: ItemData): Boolean
        {
            if (arg1 && arg1.itemInfo.item.category == ECategory._ECategorySpiritEquip && arg1.itemInfo.item.effect == 6) 
            {
                return true;
            }
            return false;
        }

        public static isSpiritEquipHDEnable(arg1: ItemData): Boolean
        {
            if (arg1 && arg1.itemExInfo.sp_act) 
            {
                return true;
            }
            return false;
        }

        public static isFahunUpgradeItem(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropAmuletSpiritUpgradeStone;
        }

        public static isFahunBreakItem(arg1: ItemData): Boolean
        {
            return arg1 && arg1.category == ECategory._ECategoryProp && arg1.type == EProp._EPropAmuletSpiritBreakStone;
        }

        public static isFashionBoxEquip(arg1: ItemData): Boolean
        {
            return ItemsUtil.isFashion(arg1) || ItemsUtil.isWing(arg1) || ItemsUtil.isFootPrint(arg1) || ItemsUtil.isBubble(arg1) || ItemsUtil.isSurround(arg1) || ItemsUtil.isWaistBelt(arg1) || ItemsUtil.isElf(arg1);
        }

        /* internal */ static /* const */ITMES: string="[items]";

        public /* var */itemPoint: SPoint;

        /* internal */ /* var */_item: TItem;

        public static /* var */CoinIcoUrl: string="CoinIco1.jpg";

        public static /* var */MagicWeaponScoreTimes: Array<any>;
    }
